package com.hl.common.result;

import lombok.*;

/**
 * @author 梁乐
 * 2022/5/9
 */
@ToString
@AllArgsConstructor
@Getter
public enum ResponseEnum {
    /**
     *  所有返回结果枚举
     */
    SUCCESS(200,"成功"),
    ERROR(500,"服务器出错"),

    //-1xx 服务器错误
    BAD_SQL_GRAMMAR_ERROR(101, "sql语法错误"),
    SERVLET_ERROR(102, "servlet请求异常"),
    UPLOAD_ERROR(103, "文件上传错误"),
    EXPORT_DATA_ERROR(104, "数据导出失败"),

    //-2xx 参数校验
    MOBILE_NULL_ERROR(201, "邮箱不能为空"),
    MOBILE_ERROR(202, "邮箱不正确"),
    PASSWORD_NULL_ERROR(203, "密码不能为空"),
    CODE_NULL_ERROR(204, "验证码不能为空"),
    CODE_ERROR(205, "验证码错误"),
    MOBILE_EXIST_ERROR(206, "邮箱已被注册"),


    LOGIN_MOBILE_ERROR(207, "用户不存在"),
    LOGIN_PASSWORD_ERROR(208, "密码错误"),
    LOGIN_AUTHORIZATION_ERROR(401, "登录失效");

    private final Integer code;
    private final String message;
}
